﻿@{
    ViewBag.Title = "Index";
}

@this.Partial("Item_js")
<style type="text/css">

.img_thum{width:100px;margin-right:5px;}
.img_red{border:1px solid #ff6a00;}
</style>
<div style="max-width:1000px;">
    <div class="topPanel">
        <div class="toolbar">
            <a class="a-btn-refresh" onclick="$ace.reload()"></a>
            <button class="a-btn-edit" data-bind="click:edit,disable:!dataTable.selectedModel()">修改</button>
            <button class="a-btn-add" data-bind="click:add">添加</button>
            <button class="a-btn-delete" data-bind="click:del,disable:!dataTable.selectedModel()">删除</button> 
        </div>
        <div class="search">
            <table class="form-table" style="width:400px;">
                <tr>
                    <td>
                        <input type="text" class="a-control" placeholder="请输入要查询关键字" style="width: 200px;" data-bind="value:searchModel().keyword">
                    </td>
                    <td>
                        <button type="button" class="a-btn-search" data-bind="click:search"></button>
                    </td>
                </tr>
            </table>
        </div>
    </div>


    <div>
        <table class="table table-hover" data-bind="with:dataTable">
            <thead>
                <tr>
                    <th style="width:20px;"></th>

                    <th>产品名称</th>
                    <th>规格</th>
                    <th>数量</th>
                    <th>价格</th>
                </tr>
            </thead>
            <tbody data-bind="foreach:models">
                <tr data-bind="click:$parent.selectRow">
                    <td data-bind="text:$parent.getOrdinal($index())"></td>

                    <td data-bind="text:ProductName"></td>
                    <td data-bind="text:ProSize"></td>
                    <td data-bind="text:ItemNum"></td>
                    <td data-bind="text:Price"></td>
                </tr>
            </tbody>
            <tbody>
                <tr>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th>总计：</th>
                    <th></th>
                </tr>
            </tbody>
            <tbody>
                <tr>
                    <th></th>
                    <th>收货人：</th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<dialogbox data-bind="with:dialog">
    <form id="form1">
        <table class="form-table">
            <tr>
                <td class="form-title">订货金额</td>
                <td class="form-value">
                    <input name="Total" id="Total" disabled type="text" class="a-control required" placeholder="" data-bind="value:model().Total" />
                </td>
            </tr>
            <tr>
                <td class="form-title">订货人</td>
                <td class="form-value">
                    <input name="CreateID" id="CreateID" disabled type="text" class="a-control required" placeholder="" data-bind="value:model().CreateID" />
                </td>
            </tr>
            <tr>
                <td class="form-title">审核人</td>
                <td class="form-value">
                    <input name="AuthID" disabled id="AuthID" type="text" class="a-control required" data-bind="value:model().AuthID" />
                </td>
            </tr>
             
            <tr>
                <td class="form-title">店铺名称</td>
                <td class="form-value"> 
                    <select class="a-control" disabled name="ShopID" id="ShopID"   data-bind="options:_shops,optionsText:'ShopName',optionsValue:'ShopID',optionsCaption:'--选择店铺--',value:model().ShopID">
                        <option value="0">--选择分类--</option>
                    </select>
                </td>
            </tr>
             
              
        </table>
    </form>
</dialogbox>

 